In this set of exercises, we will import some data.
1
Load the synthetic version of the GESIS Panel data as CSV.
The file format is CSV, so you need the readr library and a function that starts with read_...
2
Convert the variable sex to a factor.
You can do that while importing the data with the col_types argument or after loading them.
3
Export the dataset as a Stata file.
You need the haven::write_dta() function.
Bonus
Export the dataset in the statistical software format of your choice and, if you have access to this software on your computer, open it for checking.
Again, you need one of the haven::write_...() functions.